package com.lazi.june.common.exception;

import lombok.Getter;

import java.io.Serial;
import java.io.Serializable;

/**
 * desc: CommonException
 *
 * @author huliqian
 * @since 2025/8/21
 */
@Getter
public class CommonException extends RuntimeException implements ExceptionService, Serializable {


    @Serial
    private static final long serialVersionUID = 3079961237696332682L;

    /**
     * 错误码
     */
    private final int code;

    public CommonException(int code, String message) {
        super(message);
        this.code = code;
    }

    public CommonException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }
}
